<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('subtask', function (Blueprint $table) {
            $table->id();
            $table->integer('task_id')->comment('主任务ID');
            $table->integer('account_id')->comment('微信账号id');
            $table->string('query_name')->comment('查询名称');
            $table->tinyInteger('status')->default(0)->comment('状态 1正常 0禁用 2进行中 3完成 4异常');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('subtask');
    }
};
